import axios from 'axios';

let base = 'http://127.0.0.1:8000';


//注册
export const reg = params => { return axios.get(`${base}/reg/`, { params:params }).then(res => res.data); };
//登录
export const login = params => { return axios.get(`${base}/login/`, { params:params }).then(res => res.data); };
//获取用户信息
export const userinfo = params => { return axios.get(`${base}/userinfo/`, { params:params }).then(res => res.data); };
//获取已激活用户信息
export const user_info = params => { return axios.get(`${base}/user_info/`, { params:params }).then(res => res.data); };
//激活用户
export const active_user = params => { return axios.get(`${base}/active_user/`, { params:params }).then(res => res.data); };
//用户存档
export const delete_user = params => { return axios.delete(`${base}/active_user/`, { params:params }).then(res => res.data); };
//获取验证码
export const get_code = params => { return axios.get(`${base}/get_code/`, { params:params }).then(res => res.data); };
//忘记密码
export const changepwd = params => { return axios.post(`${base}/changepwd/`, params).then(res => res.data); };
//重置密码
export const reset_pwd  = params => { return axios.get(`${base}/resetpwd/`, { params:params }).then(res => res.data); }
//权限修改/分配
export const type_update = params => { return axios.get(`${base}/type_update/`, { params:params }).then(res => res.data); };
//获取个人信息
export const we_info = params => { return axios.get(`${base}/we_info/`, { params:params }).then(res => res.data); };
//获取公司信息
export const commpany = params => { return axios.get(`${base}/commpany/`, { params:params }).then(res => res.data); };
//获取使用中标签信息
export const lablelist = params => { return axios.get(`${base}/lablelist/`, { params:params }).then(res => res.data); };
//获取存档标签信息
export const del_lablelist = params => { return axios.get(`${base}/del_lablelist/`, { params:params }).then(res => res.data); };
//获取所有标签信息
export const all_lablelist = params => { return axios.get(`${base}/all_lablelist/`, { params:params }).then(res => res.data); };
//标签存档
export const delete_lable = params => { return axios.get(`${base}/delete_lable/`, { params:params }).then(res => res.data); };
//获取货物名称
export const getgoods = params => { return axios.get(`${base}/goods/`, { params:params }).then(res => res.data); };
//添加标签
export const add_lable = params => { return axios.post(`${base}/addlable/`, params).then(res => res.data); };
//修改标签
export const update_lable = params => { return axios.put(`${base}/update_lable/`, params).then(res => res.data); };
//获取所有货物信息
export const allgoods = params => { return axios.get(`${base}/all_goods/`, { params:params }).then(res => res.data); };
//货物删除
export const delete_goods = params => { return axios.delete(`${base}/delete_goods/`, { params:params }).then(res => res.data); };
//添加货物
export const add_goods = params => { return axios.post(`${base}/add_goods/`, params).then(res => res.data); };
//修改货物信息
export const update_goods = params => { return axios.put(`${base}/add_goods/`, params).then(res => res.data); };
//获取所有货物信息
export const get_goods = params => { return axios.get(`${base}/get_goods/`, { params:params }).then(res => res.data); };
//添加客户
export const add_client = params => { return axios.post(`${base}/add_client/`, params).then(res => res.data); };
//获取所有客户信息
export const getclient = params => { return axios.get(`${base}/get_client/`, { params:params }).then(res => res.data); };
//修改客户信息
export const update_Client = params => { return axios.put(`${base}/get_client/`, params).then(res => res.data); };
//添加运单
export const add_order = params => { return axios.post(`${base}/add_order/`, params).then(res => res.data); };
//获取运单列表
export const get_orderlist = params => { return axios.get(`${base}/get_orderlist/`, { params:params }).then(res => res.data); };
//修改运单信息
export const update_Order = params => { return axios.put(`${base}/get_orderlist/`, params).then(res => res.data); };
//发货
export const send = params => { return axios.post(`${base}/send/`, params).then(res => res.data); };
//收货
export const receive = params => { return axios.put(`${base}/receive/`, params).then(res => res.data); };
//获取所有运单信息
export const get_allorder = params => { return axios.get(`${base}/get_allorder/`, { params:params }).then(res => res.data); };
//获取在途运单信息
export const get_order1 = params => { return axios.get(`${base}/get_order1/`, { params:params }).then(res => res.data); };
//获取完成运单信息
export const get_order2 = params => { return axios.get(`${base}/get_order2/`, { params:params }).then(res => res.data); };
//获取报警运单信息
export const get_order3 = params => { return axios.get(`${base}/get_order3/`, { params:params }).then(res => res.data); };
//获取运单信息详情
export const get_order_info = params => { return axios.get(`${base}/get_order_info/`, { params:params }).then(res => res.data); };
//获取总览信息
export const pandect = params => { return axios.get(`${base}/pandect/`, { params:params }).then(res => res.data); };
//获取城市信息
export const city = params => { return axios.get(`${base}/city/`, { params:params }).then(res => res.data); };
//获取运单信息
export const order_in = params => { return axios.get(`${base}/order_in/`, { params:params }).then(res => res.data); };






